package com.zlx.guguanjia.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zlx.guguanjia.entity.Statute;
import com.zlx.guguanjia.mapper.StatuteMapper;
import com.zlx.guguanjia.service.StatuteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author 周罗校
 * @Description
 * @ClassName StatuteServiceImpl
 * @date 2020.10.29 17:09:19
 * 该版权归周罗校所有，最终解释权以官方为准
 */
@Service
@Transactional
public class StatuteServiceImpl extends BaseServiceImpl<Statute,Long> implements StatuteService {
    @Autowired
    private StatuteMapper mapper;

    @Override
    public PageInfo<Statute> selectPage(int start, int pageSize, Integer type) {
        PageHelper.startPage(start,pageSize);
        Statute statute = new Statute();
        statute.setDelFlag("0");
        statute.setType(type);
        return new PageInfo<>(mapper.select(statute));
    }
}
